{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "2e3e4af8-004c-45f7-b41f-7ff7ccc829b4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      "请输入有固定工资收入的党员的工资基数： 3\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "月工资基数 = 3，交纳党费 = 0.015\n"
     ]
    }
   ],
   "source": [
    "salary = int(input(\"请输入有固定工资收入的党员的工资基数：\"))  #月工资基数\n",
    "if (salary > 0 and salary <= 3000): f = 0.5 / 100 * salary\n",
    "elif (salary > 3000 and salary <= 5000): f = 1.0 / 100 * salary\n",
    "elif (salary > 5000 and salary <= 10000): f = 1.5 / 100 * salary\n",
    "elif (salary > 10000): f = 2.0 / 100 * salary\n",
    "else: print(\"月工资基数输入有误！\")\n",
    "print(str.format(\"月工资基数 = {0}，交纳党费 = {1}\", salary, f))\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d24aaa3d-f827-4461-af5b-638bbff37c4d",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
